package jianzhi_offer;

public class _42_左旋转字符串 {
    public static void main(String[] args) {
        _42_左旋转字符串 test = new _42_左旋转字符串();
        System.out.println(test.LeftRotateString("abcd",6));
    }
    public String LeftRotateString(String str,int n) {
        if (str.length() == 0){
            return "";
        }
        if(n >= str.length()) n = n%str.length();
        return str.substring(n)+str.substring(0,n);
    }
}
